package com.baizhi.cmfz.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;

@Data
@Document(indexName = "cmfz",type = "article")
public class Articel implements Serializable {

	@Id
	private Integer articelId;
	@Field(type = FieldType.Text)
	private String articelName;
	@Field(type = FieldType.Text)
	private String articelImage;
	@Field(type = FieldType.Text)
	private String articelContent;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm;ss")
//	@Field(type = FieldType.Date)
	private Date articelDate;
	//上师
	private Guru guru;
	@Field(type = FieldType.Integer)
	private Integer guruId;
}
